package business.impl;



import model.AnnexB;
import business.basic.iHibBaseDAO;
import business.basic.iHibBaseDAOImpl;
import business.dao.AnnexDao;

public class AnnexDaoImpl implements AnnexDao {
	
	iHibBaseDAO bdao = null;
	public void setBdao (iHibBaseDAO bdao){
		this.bdao=bdao;
		
	}

	@Override
	public AnnexB getAnnexById(int id) {
		AnnexB title = (AnnexB) bdao.findById(AnnexB.class,id);
		return title;
	}

	@Override
	public int addAnnex(AnnexB model) {
		Object obj = bdao.insert(model);
		if (obj == null) {
			return 0;
		}
		return 1;
	}

	@Override
	public boolean upAnnex(AnnexB model) {
		return bdao.update(model);
	}

	@Override
	public boolean delAnnex(int id) {
		return bdao.delete(AnnexB.class, id);
		
	}

	@Override
	public String getramekString(int id) {
		// TODO Auto-generated method stub
		return null;
	}


	


	

}
